#pragma once
#include "Game.h"
#include "Render.h"
#include <glut.h>
#include "Menu.h"
#include "TitleMenu.h"
#include "FrontMenu.h"
#include "DifficultySelectMenu.h"
#include "PauseMenu.h"
#include "DeathMenu.h"
#include "StageSelect.h"
#include "Hud.h"

class Dispatch
{
private:
	//
	//Private variables
	//
	State state; // holds state of the game 
	Game *game; //holds the current game object 
	Render *render; //holds the render class
	vector<Menu*> menus; //holds various menus
	Hud *hud; // holds the image for the hud
	Difficulty diff; //holds what difficulty the user is on
	int level; // holds what level the user is on

	
public:
	//
	//Constructor
	//
	Dispatch();		
	//
	//Dispatch methods
	//
	void dispatchTimerPulse(); //pulses to respective areas
	void dispatchKeyboardEvent(unsigned key); //dispatches a users keypress
	void dispatchSpecialKeyboardEvent(int key); //dispatches special keypresses
	void dispatchMouseMotionEvent(int x, int y); //dispatches mouse motion
	void dispatchMouseEvent(int button, int state, int x, int y); //dispatchs a mouse event
	void dispatchDisplay(); // draws on the screen
	//
	//Load Methods
	//
	void loadTextures(); //loads all textures
	void loadLevel(char * filename); //loads a level
	void reloadLevel(); //reloads current level
	void doLoss(); //does things associated with losing the game
	void doVictory(); //does things associated with winning a level
	void doPulse(); //does a timer pulse
	void doRender(); //does a render cycle
	//POTENTIAL dispatch EVENT ON UNFOCUS
	~Dispatch(void);
};